package com.efeichong.oss;

import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author lxk
 * @date 2021/11/24
 * @description 自动依赖注入
 */
@RequiredArgsConstructor
@Configuration
@EnableConfigurationProperties({OssConfiguration.class})
public class OssAutoConfiguration {

    private final OssConfiguration ossConfiguration;

    @Bean
    public OssFactory ossFactory() {
        return new OssFactory(ossConfiguration);
    }


}
